Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

core/repository/src/commonMain/kotlin/org/meshtastic/core/repository/MeshConnectionManager.kt bf929c20f274232e0eb8ddc19b2dc82403e99e5b (bf929c20) Text, 3.34 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.repository

Tff7b72import T7ee787org.meshtastic.proto.Telemetry

T8b949e/** Interface for managing the connection lifecycle and status with the mesh radio. */
Tff7b72interface T56d364MeshConnectionManager Tb4b4b4{
T8b949e/** Called when the radio configuration has been fully loaded. */
Tff7b72fun Td2a8ffonRadioConfigLoadedTb4b4b4(Tb4b4b4)

T8b949e/** Initiates the configuration synchronization stage. */
Tff7b72fun Td2a8ffstartConfigOnlyTb4b4b4(Tb4b4b4)

T8b949e/** Initiates the node information synchronization stage. */
Tff7b72fun Td2a8ffstartNodeInfoOnlyTb4b4b4(Tb4b4b4)

T8b949e/** Called when the node database is ready and fully populated. */
Tff7b72suspend Tff7b72fun Td2a8ffonNodeDbReadyTb4b4b4(Tb4b4b4)

T8b949e/**
* Synchronously cancels the transport-aware handshake watchdog the moment the firmware signals Stage 2 completion
* (NODE_INFO_NONCE received).
*
* This MUST be invoked before the asynchronous NodeDB install work begins so that a slow DB commit on a large mesh
* cannot trip the 12 s fast-recovery timeout after the firmware handshake has already succeeded. The watchdog
* cancellation it performs is a strict subset of [onNodeDbReady]; the remaining post-NodeDB side effects
* (analytics, MQTT start, history replay, telemetry requests) stay gated on [onNodeDbReady] at the end of the DB
* install block.
*/
Tff7b72fun Td2a8ffonHandshakeCompleteTb4b4b4(Tb4b4b4)

T8b949e/**
* Recovers from a failure after firmware handshake completion but before NodeDB install has completed.
*
* At this point the handshake watchdog has already been cancelled by [onHandshakeComplete], so recovery must
* explicitly move the app-level state out of Connecting and restart the raw transport in the same ordering used by
* handshake stall recovery.
*/
Tff7b72fun Td2a8ffrecoverPostHandshakeFailureTb4b4b4(Tb4b4b4)

T8b949e/**
* Called when meaningful handshake progress is observed on the wire (e.g. an inbound packet related to the
* in-flight config or node-info exchange).
*
* On fast transports (TCP, USB serial) this re-arms the transport-aware handshake watchdog so a steady trickle of
* progress does not trip the aggressive fast-recovery timeout while a true stall still fires on schedule. On BLE
* this is a no-op: BLE keeps the original long-and-retry stall-guard budget because GATT latency is high and
* variable.
*/
Tff7b72fun Td2a8ffonHandshakeProgressTb4b4b4(Tb4b4b4)

T8b949e/** Updates the telemetry information for the local node. */
Tff7b72fun Td2a8ffupdateTelemetryTb4b4b4(Te6edf3tTb4b4b4: Te6edf3TelemetryTb4b4b4)

T8b949e/** Updates the current status notification. */
Tff7b72fun Td2a8ffupdateStatusNotificationTb4b4b4(Te6edf3telemetryTb4b4b4: Te6edf3Telemetry? Tff7b72= Tff7b72nullTb4b4b4)

T8b949e/** Clears the cached radio configuration (local config, channel set, module config). */
Tff7b72fun Td2a8ffclearRadioConfigTb4b4b4(Tb4b4b4)
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s